type Keys = 'option1' | 'option2';
type Flags = { [K in Keys]: boolean };

// 上面的 Flags 等同于
type FlagsEqual = {
    option1:boolean,
    option2:boolean
}

// 基础类型
type Proxy<T> = {
    get(): T;
    set(value: T): void;
}
// 进行修饰
type Proxify<T> = {
    [P in keyof T]: Proxy<T[P]>;
}
function proxify<T>(o: T): Proxify<T> {
   // ... wrap proxies ...
   return 
}
let proxyProps = proxify({"aaa":"bbb"});

type Picks<T, K extends keyof T> = {
    [P in K]: T[P];
}
type Records<K extends string, T> = {
    [P in K]: T;
}
type ThreeStringProps = Records<'prop1' | 'prop2' | 'prop3', string>

